Skip to content

Adjust CLEM GridSquare registration logic#776

Open
tieneupin wants to merge 7 commits intomainfrom
clem-gridsquare-logic
Open

Adjust CLEM GridSquare registration logic#776
tieneupin wants to merge 7 commits intomainfrom
clem-gridsquare-logic

Conversation

@tieneupin
Copy link
Copy Markdown
Contributor

@tieneupin tieneupin commented Apr 2, 2026

The CLEM can be configured to acquire a second, denoised image set of a position, which is saved in its own folder with _Lng_LVCC (and other suffixes, as we discover them) appended to the position name (e.g., Position 12_Lng_LVCC--...).

Previously, these datasets were registered as separate entries in Murfey and ISPyB, but we have received feedback that where denoised datasets are acquired, the originals no longer need to be displayed.

This PR addresses this request by adjusting the grid square registration logic for the CLEM workflow. If the image set to be registered has _Lng_LVCC in its name and the original, un-denoised image set has already been registered, it will overwrite the existing entry in both Murfey and ISPyB. If the denoised one was registered first and the un-denoised one comes along, the original won't overwrite the current entry in Murfey and ISPyB.

Similar logic will eventually have to be implemented for the atlas registration, but that can be done in a separate PR to prevent this one from becoming too massive.

…nto a computed field in the CLEM model instead
…set of a pre-existing one, and to overwrite existing ImagingSite database entry if it is
…dantic model when registering things in the databases
…re that the ISPyB entries all register the denoised datasets in their final state
@tieneupin tieneupin self-assigned this Apr 2, 2026
@tieneupin tieneupin added enhancement New feature or request server Relates to the server component cryo-clem Part of the cryo-CLEM pipeline extension labels Apr 2, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 90.38462% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.99%. Comparing base (ad5e512) to head (bfa3440).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #776      +/-   ##
==========================================
+ Coverage   48.89%   48.99%   +0.10%     
==========================================
  Files          94       94              
  Lines       10008    10026      +18     
  Branches     1326     1328       +2     
==========================================
+ Hits         4893     4912      +19     
  Misses       4860     4860              
+ Partials      255      254       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@stephen-riggs stephen-riggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks fine to me.
You make an assumption that the thumbnail and image sizes will be the same for the raw and denoised data, but that seems reasonable.

…fields when a denoised dataset is received in case denoised dataset is different in size from original one
@tieneupin tieneupin requested a review from stephen-riggs April 7, 2026 14:09
@tieneupin
Copy link
Copy Markdown
Contributor Author

This all looks fine to me. You make an assumption that the thumbnail and image sizes will be the same for the raw and denoised data, but that seems reasonable.

That's a good point, and worth taking on board now. I have updated the workflow logic so that it overwrites all the column values barring session ID and site name when a denoised dataset comes in. Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cryo-clem Part of the cryo-CLEM pipeline extension enhancement New feature or request server Relates to the server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants